using Nop.Core.Domain.WindAlert;

namespace Nop.Data.Mapping.WinAlert
{
    public partial class SpotCommentMap : NopEntityTypeConfiguration<SpotComment>
    {
        public SpotCommentMap()
        {
            this.ToTable("WSpotComment");
            this.HasKey(pr => pr.Id);

            this.HasRequired(sc => sc.Spot)
                .WithMany(ws => ws.SpotComments)
                .HasForeignKey(sc => sc.SpotId);

            this.HasRequired(cc => cc.Customer)
                .WithMany()
                .HasForeignKey(cc => cc.CustomerId);
        }
    }
}